<%--
  Created by IntelliJ IDEA.
  User: maicss
  Date: 2022/5/3
  Time: 上午9:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link rel="stylesheet" href="pages/style/pages.css" type="text/css">
    <link rel="stylesheet" href="pages/style/message.css" type="text/css">
    <title><%=request.getAttribute("title")%></title>
</head>
<body>
    <p><%=request.getAttribute("context")%></p>
    <p id="reLoginTip">3秒后将返回登录页面</p>

<script>
    let ReLogin = <%=request.getAttribute("relogin")%>;
    let tip = document.getElementById("reLoginTip")
    if (ReLogin){
        let second = 3;
        setInterval(function (){
            second -= 1;
            tip.innerText = second.toString() + "秒后将返回登录页面";
        },1000)
        setTimeout(function () {
            top.location.href="login.jsp"
        },3000)
        tip.style.display="block"
    }else {
        tip.style.display="none"
    }
</script>
</body>
</html>
